const { defineConfig } = require('@vue/cli-service');
const Version = new Date().getTime().toString().match(/.*(.{8})/)[1]

module.exports = defineConfig({
  transpileDependencies: true,
  devServer: {
    port: 80,
    proxy: {
      '/api': {
        // target: 'http://localhost:8080/',
        target: 'http://localhost:8888/',
        ws: true,
        changeOrigin: true,
        pathRewrite: {
          '^/api': ''
        }
      }
    }
  },
  configureWebpack:{
    output: {
      filename: `js/[name].${Version}.js`,
      chunkFilename: `js/[name].${Version}.js`
    }
  }
})